3.97 \(\int \frac {(a+b \log (c x^n)) \log (d (e+f x^2)^m)}{x^2} \, dx\)

Optimal. Leaf size=179 \[ -\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}+\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {i b \sqrt {f} m n \text {Li}_2\left (-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {i b \sqrt {f} m n \text {Li}_2\left (\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {2 b \sqrt {f} m n \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}} \]

[Out]

-b*n*ln(d*(f*x^2+e)^m)/x-(a+b*ln(c*x^n))*ln(d*(f*x^2+e)^m)/x+2*b*m*n*arctan(x*f^(1/2)/e^(1/2))*f^(1/2)/e^(1/2)
+2*m*arctan(x*f^(1/2)/e^(1/2))*(a+b*ln(c*x^n))*f^(1/2)/e^(1/2)-I*b*m*n*polylog(2,-I*x*f^(1/2)/e^(1/2))*f^(1/2)
/e^(1/2)+I*b*m*n*polylog(2,I*x*f^(1/2)/e^(1/2))*f^(1/2)/e^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 179, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2455, 205, 2376, 4848, 2391} \[ -\frac {i b \sqrt {f} m n \text {PolyLog}\left (2,-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {i b \sqrt {f} m n \text {PolyLog}\left (2,\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}+\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}+\frac {2 b \sqrt {f} m n \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/x^2,x]

[Out]

(2*b*Sqrt[f]*m*n*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/Sqrt[e] + (2*Sqrt[f]*m*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*(a + b*Log[c*
x^n]))/Sqrt[e] - (b*n*Log[d*(e + f*x^2)^m])/x - ((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/x - (I*b*Sqrt[f]*m*n
*PolyLog[2, ((-I)*Sqrt[f]*x)/Sqrt[e]])/Sqrt[e] + (I*b*Sqrt[f]*m*n*PolyLog[2, (I*Sqrt[f]*x)/Sqrt[e]])/Sqrt[e]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2376

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2455

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.)*(x_))^(m_.), x_Symbol] :> Simp[((f*x)^(m
+ 1)*(a + b*Log[c*(d + e*x^n)^p]))/(f*(m + 1)), x] - Dist[(b*e*n*p)/(f*(m + 1)), Int[(x^(n - 1)*(f*x)^(m + 1))
/(d + e*x^n), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && NeQ[m, -1]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x^2} \, dx &=\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-(b n) \int \left (\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} x}-\frac {\log \left (d \left (e+f x^2\right )^m\right )}{x^2}\right ) \, dx\\ &=\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}+(b n) \int \frac {\log \left (d \left (e+f x^2\right )^m\right )}{x^2} \, dx-\frac {\left (2 b \sqrt {f} m n\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{x} \, dx}{\sqrt {e}}\\ &=\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (i b \sqrt {f} m n\right ) \int \frac {\log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{x} \, dx}{\sqrt {e}}+\frac {\left (i b \sqrt {f} m n\right ) \int \frac {\log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{x} \, dx}{\sqrt {e}}+(2 b f m n) \int \frac {1}{e+f x^2} \, dx\\ &=\frac {2 b \sqrt {f} m n \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {i b \sqrt {f} m n \text {Li}_2\left (-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {i b \sqrt {f} m n \text {Li}_2\left (\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 305, normalized size = 1.70 \[ \frac {-a \sqrt {e} \log \left (d \left (e+f x^2\right )^m\right )+2 a \sqrt {f} m x \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )-b \sqrt {e} \log \left (c x^n\right ) \log \left (d \left (e+f x^2\right )^m\right )+2 b \sqrt {f} m x \log \left (c x^n\right ) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )-b \sqrt {e} n \log \left (d \left (e+f x^2\right )^m\right )-i b \sqrt {f} m n x \text {Li}_2\left (-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+i b \sqrt {f} m n x \text {Li}_2\left (\frac {i \sqrt {f} x}{\sqrt {e}}\right )+i b \sqrt {f} m n x \log (x) \log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )-i b \sqrt {f} m n x \log (x) \log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )+2 b \sqrt {f} m n x \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )-2 b \sqrt {f} m n x \log (x) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} x} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/x^2,x]

[Out]

(2*a*Sqrt[f]*m*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]] + 2*b*Sqrt[f]*m*n*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]] - 2*b*Sqrt[f]*m*n
*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*Log[x] + 2*b*Sqrt[f]*m*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*Log[c*x^n] + I*b*Sqrt[f]*m
*n*x*Log[x]*Log[1 - (I*Sqrt[f]*x)/Sqrt[e]] - I*b*Sqrt[f]*m*n*x*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] - a*Sqrt[
e]*Log[d*(e + f*x^2)^m] - b*Sqrt[e]*n*Log[d*(e + f*x^2)^m] - b*Sqrt[e]*Log[c*x^n]*Log[d*(e + f*x^2)^m] - I*b*S
qrt[f]*m*n*x*PolyLog[2, ((-I)*Sqrt[f]*x)/Sqrt[e]] + I*b*Sqrt[f]*m*n*x*PolyLog[2, (I*Sqrt[f]*x)/Sqrt[e]])/(Sqrt
[e]*x)

________________________________________________________________________________________

fricas [F]  time = 0.76, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x^{2} + e\right )}^{m} d\right )}{x^{2}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m)/x^2,x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)*log((f*x^2 + e)^m*d)/x^2, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x^{2} + e\right )}^{m} d\right )}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m)/x^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x^2 + e)^m*d)/x^2, x)

________________________________________________________________________________________

maple [C]  time = 0.55, size = 1972, normalized size = 11.02 \[ \text {Expression too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*x^n)+a)*ln(d*(f*x^2+e)^m)/x^2,x)

[Out]

-a/x*ln(d)-I*m*f/(e*f)^(1/2)*arctan(1/(e*f)^(1/2)*f*x)*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-ln(d)*b/x*ln(x
^n)+(-b/x*ln(x^n)-1/2*(I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*Pi*b*cs
gn(I*c*x^n)^3+I*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2+2*b*ln(c)+2*b*n+2*a)/x)*ln((f*x^2+e)^m)-1/2*I/x*Pi*ln(d)*b*csgn
(I*c*x^n)^2*csgn(I*c)+1/2*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)/x*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*Pi*csgn(I*(f*
x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)^2*b/x*ln(x^n)-1/2*I*Pi*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)^2*b*n/x-1/4*P
i^2*csgn(I*d*(f*x^2+e)^m)^3/x*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*Pi^2*csgn(I*d*(f*x^2+e)^m)^3/x*b*csgn(I*c*x^n)
^2*csgn(I*c)+1/2*I*Pi*csgn(I*d*(f*x^2+e)^m)^3*b*n/x+1/2*I/x*Pi*ln(d)*b*csgn(I*c*x^n)^3-1/2*I*Pi*csgn(I*d)*csgn
(I*d*(f*x^2+e)^m)^2*b*n/x-1/2*I*Pi*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)^2/x*b*ln(c)-1/2*I/x*Pi*ln(d)*b*cs
gn(I*x^n)*csgn(I*c*x^n)^2+1/4*Pi^2*csgn(I*d)*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)/x*b*csgn(I*c*x^n)^3+1/4
*Pi^2*csgn(I*d)*csgn(I*d*(f*x^2+e)^m)^2/x*b*csgn(I*x^n)*csgn(I*c*x^n)^2+1/4*Pi^2*csgn(I*d)*csgn(I*d*(f*x^2+e)^
m)^2/x*b*csgn(I*c*x^n)^2*csgn(I*c)-1/2*I*Pi*csgn(I*d)*csgn(I*d*(f*x^2+e)^m)^2*a/x-1/2*I*Pi*csgn(I*(f*x^2+e)^m)
*csgn(I*d*(f*x^2+e)^m)^2*a/x+1/2*I*Pi*csgn(I*d*(f*x^2+e)^m)^3/x*b*ln(c)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {{\left (b m \log \left (x^{n}\right ) + {\left (m n + m \log \relax (c)\right )} b + a m\right )} \log \left (f x^{2} + e\right )}{x} + \int \frac {b e \log \relax (c) \log \relax (d) + {\left ({\left (2 \, f m + f \log \relax (d)\right )} a + {\left (2 \, f m n + {\left (2 \, f m + f \log \relax (d)\right )} \log \relax (c)\right )} b\right )} x^{2} + a e \log \relax (d) + {\left ({\left (2 \, f m + f \log \relax (d)\right )} b x^{2} + b e \log \relax (d)\right )} \log \left (x^{n}\right )}{f x^{4} + e x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m)/x^2,x, algorithm="maxima")

[Out]

-(b*m*log(x^n) + (m*n + m*log(c))*b + a*m)*log(f*x^2 + e)/x + integrate((b*e*log(c)*log(d) + ((2*f*m + f*log(d
))*a + (2*f*m*n + (2*f*m + f*log(d))*log(c))*b)*x^2 + a*e*log(d) + ((2*f*m + f*log(d))*b*x^2 + b*e*log(d))*log
(x^n))/(f*x^4 + e*x^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\ln \left (d\,{\left (f\,x^2+e\right )}^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(e + f*x^2)^m)*(a + b*log(c*x^n)))/x^2,x)

[Out]

int((log(d*(e + f*x^2)^m)*(a + b*log(c*x^n)))/x^2, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(f*x**2+e)**m)/x**2,x)

[Out]

Timed out

________________________________________________________________________________________